home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / infoserv / www / cern / doc / www-talk.archive.Z / www-talk.archive / text0212.txt < prev    next >
Encoding:
Text File  |  1992-11-30  |  2.7 KB  |  83 lines

  1. I've just cooked up a MIF->HTML filter (for frame docs created from
  2. HTML files in the first place). It's written in XLISP, which is a
  3. widely available lisp interpreter with OOP extensions (the thing builds
  4. on PCs, Macs, and Unix boxes).
  5.  
  6. This completes the circle:
  7.     # HTML to MML
  8.     sgmls foo.html | xlisp html2mml.l >foo.mml
  9.     # now you can load foo.mml into frame
  10.     # Then you can save it as mif. Or, you
  11.     # can just do
  12.     mmltomif <foo.mml >foo.mif
  13.     # Then you can convert it back to html:
  14.     xlisp mif2html.l <foo.mif >foo.html
  15.  
  16. Note that this does not address the issue of converting "legacy
  17. documents" currently in Frame to HTML. The Frame documents
  18. have to use the right paragraph tags so that I can recognize
  19. the SGML structure of the file.
  20.  
  21. But it has some interesting possibilities:
  22.  
  23. * Frame can be configured to convert files based on
  24. their extension. So you can edit some frame config
  25. file so that when you open foo.html, it invokes
  26. the html2mml and mmltomif filters, and voila! you
  27. can load WWW files into FrameMaker.
  28.  
  29. I think you can do the same thing for saving. So
  30. you could use FrameMaker much like the NeXT browser.
  31.  
  32. * Frame has hypertext which is extensible through
  33. RPC calls. I translated the HTML sequence
  34.     <A HREF="scheme:addr">text</a>
  35. to
  36.     <italic>
  37.     <Marker <MType 8> <MText "message www scheme:addr">>
  38.     text
  39.     <noitalic>
  40. in MML. Marker type 8 is hypertext. So when you click on
  41. "text", the MText is invoked. "message www" means make
  42. an RPC call to www with "scheme:addr" as the argument.
  43.  
  44. So we could write a www RPC client that fetches WWW nodes
  45. and hands them to Frame.
  46.  
  47. I'm not going to distribute the code right now,
  48. because 1) it's not very polished, and 2) the www-talk
  49. audience didn't respond to my html->mml filter with
  50. much enthusiasm (I assume that's because it required
  51. you to build XLISP (easy) and SGMLs (bigger, but still
  52. easy)).
  53.  
  54. There are a few things that I didn't bother to code yet:
  55.  
  56. * mapping Frame's funkey apostrophies and quotes
  57. to plain ASCII. (in general, we want to convert
  58. Frame's funky "Diacritic Encoding" to whatever character
  59. set HTML uses (ISO latin-1?))
  60.  
  61. * mapping <A NAME="2"> to <MText "newlink 2"> and back.
  62.  
  63. * mapping <A HREF="#2"> to <MText "gotolink 2"> and back.
  64.  
  65. * mapping <A HREF="file:foo#bar"> to <MText "gotolink foo:bar"> and back.
  66.  
  67. Good night.
  68.  
  69. Dan
  70.  
  71. p.s. I discovered that the DTD in the WWW browser code
  72. considers <LI>, <DT>, and <DD> to be empty elements.
  73. I changed my copy of html.dtd accordingly. The one
  74. in the web will need to be changed.
  75.  
  76. This causes the UL, OL, DL, etc. items to have mixed
  77. content, which gives newlines all sorts of tricky
  78. twists.
  79.  
  80. Mixed content is something to be avoided in SGML DTD's,
  81. for reasons that are far too ugly to explain right now.
  82.  
  83.